console.log(100);
for (let i = 0; i < 100; i++) {
    for (let y = 0; y < 4; y++) {
        let line = "";
        for (let x = 0; x < 4; x++) {
            const num = 2 ** (Math.floor(Math.random() * 10) + 1);
            line += x < 3 ? `${num} ` : `${num}`;
        }
        console.log(line);
    }
    switch (Math.floor(Math.random() * 4)) {
        case 0: console.log("UP"); break;
        case 1: console.log("DOWN"); break;
        case 2: console.log("LEFT"); break;
        case 3: console.log("RIGHT"); break;
    }
}
